<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    var str = 'addBoard.boardWidth * addBoard.boardHeight -> addBoard.imageFile';

//    var re = /((?:\w|\.)*)\*((?:\w|\.)*)->(.*)/.exec(str);
    var re = /((?:\s|\w|\.)*)\*((?:\s|\w|\.)*)->(.*)/.exec(str);
    console.log(re);
</script>

</body>
</html>